import React, { Component } from 'react'
import { connect } from 'react-redux'
import DmList from './dmList'
import DmFooter from './dmFooter'
import Toast from '../Toast'

class DmComponent extends Component {
  render() {
    const { showDm } = this.props
    return (
      <div className={`dm_con ${showDm ? 'show' : 'hide'}`}>
        <DmList/>
        <Toast type="dm"/>
        <DmFooter/>
      </div>
    )
  }
}
const mapStateTopProps = (state) => {
  return {
    showDm: state.DmState.show,
  }
}
export default connect(mapStateTopProps)(DmComponent)
